import json

# json数据的读取
def read_data(filename):
    with open(filename, "r") as f:
        return json.load(f)

# json数据写入
def write_data(filename, data):
    with open(filename, "w") as f:
        return json.dump(data, f, ensure_ascii=False, indent=2)